<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jspf/must/basePath.jspf" %>
<!--后台UI组件Start-->
<%@include file="/WEB-INF/jspf/zj/ligerui/LigerUI.jspf" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>

        <script>
            $(function () {
                iniShowConfig();
            });
            function iniShowConfig() {
                $.post("weixinkeji/dev/dc/base/fwy/h/config/s/selectAll.imy", {}, function (data) {
                    $("#ID_showFWYConfig").html(data.fwyConfig_style == 0 ? "启用中" : "停用中");
//                    $("#ID_showWeekConfig").html(data.promotionConfig_week_style == 1 ? "启用中" : "停用中");
                }, "json");
            }

            function updateConfig_fwy(v) {
                post_json("weixinkeji/dev/dc/base/fwy/h/config/u/update.imy", {fwyConfig_style: v}, 400, 200);
                iniShowConfig();
            }


        </script>

        <style type="text/css">
            .my_table{border-collapse:collapse; text-align: center} 
            .td_head{background-color: #EEEEEE;}
        </style>
    </head>
    <body>
        <div><h1>设置中心</h1></div>
        <br/>
        <hr/>
        <br/>
        <div>
            <table class="my_table" border="1">
                <thead class="td_head">
                    <tr>
                        <td style="width: 90px;">说明</td>
                        <td style="width: 90px;">目前状态</td>
                        <td style="width: 90px;">启用操作</td>
                        <td style="width: 90px;">禁用操作</td>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>只能查询自己的订单</td><td><div id="ID_showFWYConfig"></div></td><td><button onclick="updateConfig_fwy(0)">启用</button></td><td><button onclick="updateConfig_fwy(1)">禁用</button></td>
                    </tr>
                    <!--                    <tr>
                                            <td>每周活动</td><td><div id="ID_showWeekConfig"></div></td><td><button onclick="updateConfig_week(1)">启用</button></td><td><button onclick="updateConfig_week(0)">禁用</button></td>
                                        </tr>-->
                </tbody>
            </table>
        </div>
    </body>
</html>
